package com.framework.spring.controller;

import com.framework.spring.annotations.*;
import com.framework.spring.domain.User;

@Controller
@Component
@RequestMapping("/hello")
public class HelloController {

    @RequestMapping("/text")
    public Object helloText(@Param("name") String name, @Param("age") Integer age) {
        return new User(name, age);
    }

    @RequestMapping("/json")
    @ResponseBody
    public Object helloJson(@Param("name") String name, @Param("age") Integer age) {
        return new User(name, age);
    }

}
